
<?php
	defined('_JEXEC') or die('Restricted access');
	require_once(CUTEENGINE_BASE_FIELD_PATH."base_field_class.php");
    
	//
    // t_field_delayed_load
    //
	class t_field_delayed_load extends t_base_field
	{
        
        // property declaration
		// protected

        // property declaration
		// public
		// G
		const language_position_last = 1;
		loading_type_image = 1;
		loading_type_procedure = 2;
		loading_type_last = 3;
		// P
        const proper_properties_position_per_loading_type = 1;
		const proper_properties_position_per_loading_first_arg = 2;
		const proper_properties_position_per_loading_second_arg = 3;
		const proper_properties_position_last = 4;
        // method declaration
    	// protected

		
        // G
		protected function get_field_event_script($a_event_type,$a_argouments)
        {			
			$local_return = '';
			return $local_return;
		}
static function get_help_proper_property($a_index)
		{
			$local_return = 'NO HELP AVAILABLE';
			/*switch ($a_index) 
            {
                case self::proper_properties_position_:
					$local_return = '';
				break;                
			}*/
			return $local_return;
		}
        static function get_default_proper_property($a_index)
		{
			$local_return = '';
			/*switch ($a_index) 
            {
                case self::proper_properties_position_:
					$local_return = 'TRUE';
				break;                
			}*/
			return $local_return;
		}
		protected function get_proper_properties_position_last()      
		{
            return self::proper_properties_position_last;
        }
		
        // method declaration
    	// public
        public function __construct($a_parent_part,$a_common_properties_str, $a_proper_properties_str)
		{
            parent::__construct($a_parent_part,$a_common_properties_str, $a_proper_properties_str);
            
			
		}

		// C
		public function create_javascript_initialization_component()
		{
			global $g_javascript_namespace;
			$g_javascript_namespace->header_script_generator->add_method_to_a_class_with_content(
				get_class($this),'active_images','',"	
					var container = document.getElementById (\"offerte_result\");
					var imgTags = container.getElementsByTagName (\"img\");
					

					for (var i = 0; i < imgTags.length; i++) {
						var imgTag = imgTags[i];
						imgTag.src = this.imgLabels[i];
					}
					clearTimeout (this.timerID);

		");
			$g_javascript_namespace->header_script_generator->add_content_to_a_method(get_class($this),
				t_header_script_generator::create_label,"
					 this.imgLabels = new Array();
					 this.timerID = setTimeout (this.active_images.set_scope(this), 100);
					");
		}		
        public function create_tags_structure()
        {
            global $g_javascript_namespace;
            //echo __METHOD__."<BR>";
            //echo "this->proper_properties_array[self::proper_properties_position_per_NULL]: '".$this->proper_properties_array[self::proper_properties_position_per_NULL]."'<br>";
            if (($this->proper_properties_array[self::proper_properties_position_per_NULL] == 1) ||
                (strtoupper($this->proper_properties_array[self::proper_properties_position_per_NULL]) == "TRUE"))
                $local_can_not_be_empty = "true";
            else
                $local_can_not_be_empty = "false";
           // echo "local_can_not_be_empty: $local_can_not_be_empty<br>";
			$local_can_not_be_empty_msg = addslashes($this->lang[self::language_position_per_can_not_be_empty]);	
            $local_invalid_value_msg = addslashes($this->lang[self::language_position_per_invalid_value]);	
            parent::create_tags_structure(
				// ARGUMENTS DECLARATIONS
                "a_can_not_be_empty,a_can_not_be_empty_msg,a_invalid_value_msg",
                // ARGUMENTS VALUES
                "$local_can_not_be_empty,'$local_can_not_be_empty_msg','$local_invalid_value_msg'");
			// proprierties

			$g_javascript_namespace->header_script_generator->add_property_to_a_class(
                get_class($this),'can_not_be_empty',"a_can_not_be_empty",false);
           
            
        }
       	// G	
		public function get_language_position_last()
        {
            return self::language_position_last;
        }
		public function get_result_action_script($a_event_type,$parent_event_type,
            $a_parameter,$a_content_loader_result)
		{
            return '';
        }		
		
// I
		public function initialize_field_event($a_event_type)
        {			
			
		}
        
       

		

    }
?>    